3.383 \(\int \frac{(a+b \log (c (d+e x)^n)) (f+g \log (c (d+e x)^n))}{x^2} \, dx\)

Optimal. Leaf size=96 \[ -\frac{2 b e g n^2 \text{PolyLog}\left (2,\frac{d}{d+e x}\right )}{d}+\frac{e n \log \left (1-\frac{d}{d+e x}\right ) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )}{d}-\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )}{x} \]

[Out]

-(((a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]))/x) + (e*n*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n])*Log
[1 - d/(d + e*x)])/d - (2*b*e*g*n^2*PolyLog[2, d/(d + e*x)])/d

________________________________________________________________________________________

Rubi [A]  time = 0.346025, antiderivative size = 169, normalized size of antiderivative = 1.76, number of steps used = 11, number of rules used = 6, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {2439, 2411, 2344, 2301, 2317, 2391} \[ \frac{2 b e g n^2 \text{PolyLog}\left (2,\frac{e x}{d}+1\right )}{d}-\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )}{x}+\frac{e g n \log \left (-\frac{e x}{d}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{d}-\frac{e g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b d}+\frac{b e n \log \left (-\frac{e x}{d}\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )}{d}-\frac{b e \left (g \log \left (c (d+e x)^n\right )+f\right )^2}{2 d g} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]))/x^2,x]

[Out]

(e*g*n*Log[-((e*x)/d)]*(a + b*Log[c*(d + e*x)^n]))/d - (e*g*(a + b*Log[c*(d + e*x)^n])^2)/(2*b*d) + (b*e*n*Log
[-((e*x)/d)]*(f + g*Log[c*(d + e*x)^n]))/d - ((a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]))/x - (b*e*
(f + g*Log[c*(d + e*x)^n])^2)/(2*d*g) + (2*b*e*g*n^2*PolyLog[2, 1 + (e*x)/d])/d

Rule 2439

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*
(g_.))*(x_)^(r_.), x_Symbol] :> Simp[(x^(r + 1)*(a + b*Log[c*(d + e*x)^n])^p*(f + g*Log[h*(i + j*x)^m]))/(r +
1), x] + (-Dist[(g*j*m)/(r + 1), Int[(x^(r + 1)*(a + b*Log[c*(d + e*x)^n])^p)/(i + j*x), x], x] - Dist[(b*e*n*
p)/(r + 1), Int[(x^(r + 1)*(a + b*Log[c*(d + e*x)^n])^(p - 1)*(f + g*Log[h*(i + j*x)^m]))/(d + e*x), x], x]) /
; FreeQ[{a, b, c, d, e, f, g, h, i, j, m, n}, x] && IGtQ[p, 0] && IntegerQ[r] && (EqQ[p, 1] || GtQ[r, 0]) && N
eQ[r, -1]

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 2344

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_Symbol] :> Dist[1/d, Int[(a + b*
Log[c*x^n])^p/x, x], x] - Dist[e/d, Int[(a + b*Log[c*x^n])^p/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, n}, x]
 && IGtQ[p, 0]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x^2} \, dx &=-\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x}+(b e n) \int \frac{f+g \log \left (c (d+e x)^n\right )}{x (d+e x)} \, dx+(e g n) \int \frac{a+b \log \left (c (d+e x)^n\right )}{x (d+e x)} \, dx\\ &=-\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x}+(b n) \operatorname{Subst}\left (\int \frac{f+g \log \left (c x^n\right )}{x \left (-\frac{d}{e}+\frac{x}{e}\right )} \, dx,x,d+e x\right )+(g n) \operatorname{Subst}\left (\int \frac{a+b \log \left (c x^n\right )}{x \left (-\frac{d}{e}+\frac{x}{e}\right )} \, dx,x,d+e x\right )\\ &=-\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x}+\frac{(b n) \operatorname{Subst}\left (\int \frac{f+g \log \left (c x^n\right )}{-\frac{d}{e}+\frac{x}{e}} \, dx,x,d+e x\right )}{d}-\frac{(b e n) \operatorname{Subst}\left (\int \frac{f+g \log \left (c x^n\right )}{x} \, dx,x,d+e x\right )}{d}+\frac{(g n) \operatorname{Subst}\left (\int \frac{a+b \log \left (c x^n\right )}{-\frac{d}{e}+\frac{x}{e}} \, dx,x,d+e x\right )}{d}-\frac{(e g n) \operatorname{Subst}\left (\int \frac{a+b \log \left (c x^n\right )}{x} \, dx,x,d+e x\right )}{d}\\ &=\frac{e g n \log \left (-\frac{e x}{d}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{d}-\frac{e g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b d}+\frac{b e n \log \left (-\frac{e x}{d}\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{d}-\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x}-\frac{b e \left (f+g \log \left (c (d+e x)^n\right )\right )^2}{2 d g}-2 \frac{\left (b e g n^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (1-\frac{x}{d}\right )}{x} \, dx,x,d+e x\right )}{d}\\ &=\frac{e g n \log \left (-\frac{e x}{d}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{d}-\frac{e g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b d}+\frac{b e n \log \left (-\frac{e x}{d}\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{d}-\frac{\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x}-\frac{b e \left (f+g \log \left (c (d+e x)^n\right )\right )^2}{2 d g}+\frac{2 b e g n^2 \text{Li}_2\left (1+\frac{e x}{d}\right )}{d}\\ \end{align*}

Mathematica [A]  time = 0.0284772, size = 180, normalized size = 1.88 \[ \frac{2 b e g n^2 \text{PolyLog}\left (2,\frac{d+e x}{d}\right )}{d}-\frac{a g \log \left (c (d+e x)^n\right )}{x}+\frac{a e g n \log (x)}{d}-\frac{a e g n \log (d+e x)}{d}-\frac{a f}{x}-\frac{b f \log \left (c (d+e x)^n\right )}{x}-\frac{b e g \log ^2\left (c (d+e x)^n\right )}{d}-\frac{b g \log ^2\left (c (d+e x)^n\right )}{x}+\frac{2 b e g n \log \left (-\frac{e x}{d}\right ) \log \left (c (d+e x)^n\right )}{d}+\frac{b e f n \log (x)}{d}-\frac{b e f n \log (d+e x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]))/x^2,x]

[Out]

-((a*f)/x) + (b*e*f*n*Log[x])/d + (a*e*g*n*Log[x])/d - (b*e*f*n*Log[d + e*x])/d - (a*e*g*n*Log[d + e*x])/d - (
b*f*Log[c*(d + e*x)^n])/x - (a*g*Log[c*(d + e*x)^n])/x + (2*b*e*g*n*Log[-((e*x)/d)]*Log[c*(d + e*x)^n])/d - (b
*e*g*Log[c*(d + e*x)^n]^2)/d - (b*g*Log[c*(d + e*x)^n]^2)/x + (2*b*e*g*n^2*PolyLog[2, (d + e*x)/d])/d

________________________________________________________________________________________

Maple [C]  time = 0.577, size = 931, normalized size = 9.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*(e*x+d)^n))/x^2,x)

[Out]

I*e*n/d*ln(x)*Pi*b*g*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2-I*e*n/d*ln(e*x+d)*Pi*b*g*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+
d)^n)^2-I*ln((e*x+d)^n)/x*Pi*b*g*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2+b*g*e*n^2/d*ln(e*x+d)^2-ln((e*x+d)^n)
/x*a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(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+I*ln((e*x+d)^n)
/x*Pi*b*g*csgn(I*c*(e*x+d)^n)^3-2*b*g*e*n*ln((e*x+d)^n)/d*ln(e*x+d)+I*e*n/d*ln(e*x+d)*Pi*b*g*csgn(I*c)*csgn(I*
(e*x+d)^n)*csgn(I*c*(e*x+d)^n)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -b e f n{\left (\frac{\log \left (e x + d\right )}{d} - \frac{\log \left (x\right )}{d}\right )} - a e g n{\left (\frac{\log \left (e x + d\right )}{d} - \frac{\log \left (x\right )}{d}\right )} - b g{\left (\frac{\log \left ({\left (e x + d\right )}^{n}\right )^{2}}{x} - \int \frac{e x \log \left (c\right )^{2} + d \log \left (c\right )^{2} + 2 \,{\left ({\left (e n + e \log \left (c\right )\right )} x + d \log \left (c\right )\right )} \log \left ({\left (e x + d\right )}^{n}\right )}{e x^{3} + d x^{2}}\,{d x}\right )} - \frac{b f \log \left ({\left (e x + d\right )}^{n} c\right )}{x} - \frac{a g \log \left ({\left (e x + d\right )}^{n} c\right )}{x} - \frac{a f}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n))/x^2,x, algorithm="maxima")

[Out]

-b*e*f*n*(log(e*x + d)/d - log(x)/d) - a*e*g*n*(log(e*x + d)/d - log(x)/d) - b*g*(log((e*x + d)^n)^2/x - integ
rate((e*x*log(c)^2 + d*log(c)^2 + 2*((e*n + e*log(c))*x + d*log(c))*log((e*x + d)^n))/(e*x^3 + d*x^2), x)) - b
*f*log((e*x + d)^n*c)/x - a*g*log((e*x + d)^n*c)/x - a*f/x

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b g \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + a f +{\left (b f + a g\right )} \log \left ({\left (e x + d\right )}^{n} c\right )}{x^{2}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n))/x^2,x, algorithm="fricas")

[Out]

integral((b*g*log((e*x + d)^n*c)^2 + a*f + (b*f + a*g)*log((e*x + d)^n*c))/x^2, x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \log{\left (c \left (d + e x\right )^{n} \right )}\right ) \left (f + g \log{\left (c \left (d + e x\right )^{n} \right )}\right )}{x^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(e*x+d)**n))*(f+g*ln(c*(e*x+d)**n))/x**2,x)

[Out]

Integral((a + b*log(c*(d + e*x)**n))*(f + g*log(c*(d + e*x)**n))/x**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}{\left (g \log \left ({\left (e x + d\right )}^{n} c\right ) + f\right )}}{x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n))/x^2,x, algorithm="giac")

[Out]

integrate((b*log((e*x + d)^n*c) + a)*(g*log((e*x + d)^n*c) + f)/x^2, x)